<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="./common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
	<HEAD>
		<META content="IE=7.0000" http-equiv="X-UA-Compatible">
		<TITLE>清华二手网|清华二手市场|清华二手物品交易 - 清华载物网</TITLE>
		<link charset="utf-8" type="text/css" href="css/common.css"
			rel="stylesheet" />
		<META content="text/html; charset=utf-8" http-equiv=Content-Type>
		<META name=Description
			content=厦门二手频道是网上厦门二手市场，提供免费的厦门二手信息发布，有闲置物品旧货出售求购交换需求，请来赶集厦门二手网。>
		<META name=GENERATOR content="MSHTML 8.00.7601.17537">
		<link type="text/css" href="css/jquery-ui-1.8.14.custom.css" />
		<script src="js/jquery-1.5.1.min.js"></script>
		<script type="text/javascript">
var flag=true;
function validate() {
var name2=$.trim(jQuery("#username").val());
	if(name2=="")
		{
		jQuery("#userNameError").html("<label><font color='red' size='0.8em'>用户名不能为空喔！</font></label>");
		flag=false;
		}
	else{
	jQuery.post("checkRegeditAction.action", {
			username :jQuery("#username").val()
		}, function(data) {
			if (data=="no") {
			jQuery("#userNameError").html(
						"<label><font color='red' size='0.8em'>用户名已存在，换一个吧！</font></label>");
			flag = false;	}
			 else {
			// table1 = document.getElementById("username").value=data;	
			jQuery("#userNameError").html(""); 
			 flag = true;
			}
		}, "json");
	}
		
	}

function validatemail()
{
	var email=$.trim(jQuery("#mail").val());
	if(email=="")
		{
		jQuery("#emailError").html("<label><font color='red' size='0.8em'>邮箱不能为空喔！</font></label>");
		}
	else
	{
		if(!/\w+@\w+(\.\w+)+/ig.test(email)){
			jQuery("#emailError").html("<label><font color='red' size='0.8em'>邮箱格式不正确喔！</font></label>");
			}
			else
			{
			jQuery("#emailError").html(""); 
			}
	}
		
}

function validatepw()
{
	var pw=$.trim(jQuery("#password").val());
	var pw2=$.trim(jQuery("#checkpassword").val());
	if(pw=="")
		{
		jQuery("#passError").html("<label><font color='red' size='0.8em'>密码不能为空喔！</font></label>");
		}
	else if(pw.length<6||pw.length>16)
		{
		jQuery("#passError").html("<label><font color='red' size='0.8em'>密码长度为6-16位字符！</font></label>");
		}
	else
	{
			jQuery("#passError").html("");
			if(pw!=pw2)
			jQuery("#passError2").html("<label><font color='red' size='0.8em'>两次输入密码要一致喔！</font></label>");
		else
			jQuery("#passError2").html("");
	}
	
		
}

function check(form)
			{	
				if(form.username.value == "")
				{
					alert("用户名不能为空！");
					form.username.focus();
					return false;
				}	
				if(form.password.value == "")
				{
					alert("密码不能为空！");
					form.password.focus();
					return false;
				}	
				if(form.checkpassword.value == "")
				{
					alert("密码不能为空！");
					form.checkpassword.focus();
					return false;
				}	
				form.submit.disabled = true;
			}

</script>
	</HEAD>
	<BODY>
		<s:include value="include/top.jsp"></s:include>
		<s:include value="include/search.jsp"></s:include>

		<DIV class=wrapper>
			<!--mainBox -->
			<DIV class=mainBox>
				<s:include value="include/subnav.jsp"></s:include>
				<DIV class=content>
					<DIV class="twocolumn-wrap clearfix">
						<DIV class="top-info blue-box">
							<P class=top-info-p>
								注册赶集网只需10秒，发布、管理信息更轻松
							</P>
							<DIV class="rj blt"></DIV>
							<DIV class="rj blb"></DIV>
							<DIV class="rj brt"></DIV>
							<DIV class="rj brb"></DIV>
						</DIV>
						<DIV style="POSITION: relative" class=reg-box>
							<s:form action="regeditAction" method="post"
								enctype="multipart/form-data" onsubmit="return check(this);">
								<DIV class=field>
									<LABEL for=username>
										用户名：
									</LABEL>
									<s:textfield id="username" cssClass="input-text" size="50"
										name="user.username" onblur="validate()" />
									<span id="userNameError"></span>
								</DIV>
								<DIV class=field>
									<LABEL for=password>
										密码：
									</LABEL>
									<s:password id="password" cssClass="input-text" size="50"
										name="user.password" onblur="validatepw()"/>
									<span id="passError"></span>
								</DIV>
								<DIV class=field>
									<LABEL for=confirm-password>
										确认密码：
									</LABEL>
									<s:password cssClass="input-text" id="checkpassword" size="50"
										name="checkpassword" onblur="validatepw()"/>
									<span id="passError2"></span>
								</DIV>
								<DIV class=field>
									<LABEL for=email>
										(可选填)邮箱：
									</LABEL>
									<s:textfield cssClass="input-text" id="mail" size="50"
										name="userinfo.mail" onblur="validatemail()" />
									<span id="emailError"></span>
								</DIV>
								<DIV class=radio>
									<SPAN style="WIDTH: 232px; FLOAT: left"><INPUT
											class=radio-btn CHECKED type=checkbox name=affirm> <LABEL
											for=term-of-service>
											我接受赶集网
											<A
												href="http://www.ganji.com/misc/abouts/index.php?act=termofservice"
												target=_blank>服务条款</A>
										</LABEL> </SPAN><SPAN style="WIDTH: 136px" id=tip_affirm></SPAN>
								</DIV>
								<DIV class=reg-submit>
									<input class=reg-btn id="loginSubmit" type="submit"
										name="submit" value="立即注册" />
									&nbsp;&nbsp;
								</DIV>
							</s:form>
						</DIV>
						<DIV class=right style="display:none">
							<H3>
								手机短信快速注册
							</H3>
							<P class=sm>
								编辑短信"
								<SPAN class=red>注册</SPAN>"发送到
							</P>
							<P class="green fs16">
								1069 0195 8720
							</P>
							<UL class="ulsite grey">
								<LI>
									短信发送后即可成功注册
								<LI>
									运营商收取正常短信费用，无额外费用
								</LI>
							</UL>
							<DIV class=login-block>
								<P>
									已有赶集网账号，请直接登录
								</P>
								<DIV class=login-submit>
									<A id=login-submit class=login-btn
										href="http://xm.ganji.com/user/login.php">登录赶集</A>
								</DIV>
							</DIV>
						</DIV>
					</DIV>
				</DIV>
			</DIV>
		</DIV>
		<!--mainBox end -->
		</DIV>
		<s:include value="include/footer.jsp"></s:include>
	</BODY>
</HTML>
